#include "dlgnewdocument.h"
#include "ui_dlgnewdocument.h"

DlgNewDocument::DlgNewDocument(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DlgNewDocument)
{
    ui->setupUi(this);
    ui->lineTitle->setText("Untitled");
    ui->lineTitle->selectAll();
}

DlgNewDocument::~DlgNewDocument()
{
    delete ui;
}

QString DlgNewDocument::documentTitle()
{
    return ui->lineTitle->text();
}

void DlgNewDocument::on_pushOK_clicked()
{
    accept();
}

void DlgNewDocument::on_pushCancel_clicked()
{
    reject();
}
